<!--<?php 
if(empty($action)){
print <<<EOT
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="js/png_IE6.js" type="text/javascript"></script>
<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/public.js" type="text/javascript"></script>
<script src="js/common.js" type="text/javascript"></script>
<title>站长-右侧</title>
<link href="css/admin.css" rel="stylesheet" type="text/css" />
<link href="css/zhanzhang_right.css" rel="stylesheet" type="text/css" />
<script>
function SelectSite(obj){
	window.location = "$index_file&site_id="+obj.value;
}
</script>
</head>

<body class="code">
<div class="right_box">
<form action="$index_file" method="get" name="form" id="form">
<div class="right_tit">
<dl>
<dt></dt>
<dd>站长个人页面--广告位管理</dd>
</dl>
</div>
<div class="admin_add">
<dl>

<!--
EOT;
if(empty($site_id)) echo '<dd class="dd02"><input type="radio" name="site_id" value="" onclick="SelectSite(this);" checked/><strong>全部</strong></dd>';
else echo '<dd class="dd02"><input type="radio" name="site_id" value="" onclick="SelectSite(this);"/><strong>全部</strong></dd>';
foreach($db_affsitelist as $db_affsite){
	if($db_affsite[id]==$site_id)
		echo '<dd class="dd02"><input name="site_id" type="radio" value="'.$db_affsite[id].'" onclick="SelectSite(this);" checked/><strong>'.$db_affsite[name].'</strong></dd>';
	else
		echo '<dd class="dd02"><input name="site_id" type="radio" value="'.$db_affsite[id].'" onclick="SelectSite(this);"/><strong>'.$db_affsite[name].'</strong></dd>';
}
print <<<EOT
-->
<dd class="dd00"></dd>
</dl>
</div>

<div class="admin_list">
<dl>
<dd class="dd01"><input id="Checkbox1" name="as" onclick="allchecked()" type="checkbox" /><strong>广告位ID</strong></dd>
<dd class="dd02"><strong>广告位名称</strong></dd>
<dd class="dd01"><strong>所属网站</strong></dd>
<dd class="dd02"><strong>广告位尺寸</strong></dd>
<dd class="dd01"><strong>每周计价</strong></dd>
<dd class="dd02"><strong>点击计价</strong></dd>
<dd class="dd01"><strong>创建时间</strong></dd>
<dd class="dd02">状态</dd>
<dd class="dd03"><strong>操作</strong></dd>

<!--
EOT;
$curidx = ($curpage-1)*$perpage;
$curpageidx = 0;
$showcount = count($db_affadplacelist); 
foreach($db_affadplacelist as $db_affadplace){
$cdate = date('Y/m/d H:i',$db_affadplace[create_time]);
$db_placeaudit = $cfg_userstatus[$db_affadplace[audit]];
print <<<EOT
-->
<dd class="dd01"><input id="ids" name="ids" type="checkbox" value="$db_affadplace[id]" />$db_affadplace[id]</dd>
<dd class="dd02">$db_affadplace[name]</dd>
<dd class="dd01">$db_affadplace[site_name]</dd>
<dd class="dd02">$db_affadplace[adsize]</dd>
<dd class="dd01">$db_affadplace[week_price]</dd>
<dd class="dd02">$db_affadplace[click_price]</dd>
<dd class="dd01">$cdate</dd>
<dd class="dd02">$db_placeaudit</dd>
<dd class="dd03"><a href="$index_file&action=edit&curid=$db_affadplace[id]&curpage=$curpage">修改</a></dd>
<!--
EOT;
}
print <<<EOT
-->
</dl>

<table id="Table1" border="0" cellpadding="0" cellspacing="0" width="98%">
        <tr>
            <td align="right" height="35" valign="middle">
<!--
EOT;
	showPageBreakInfo($showcount);
print <<<EOT
-->
             </td>
        </tr>
    </table>

</div>
<input id="Hidden1" name="allSelect" type="hidden" value="all" />
<input type="hidden" id="count" name="count" value="$showcount" />
<div class="admin_btn">
<dl>
<dd><input name="btnAdd" type="button" value="新增" class="input1" onclick="window.location='$index_file&action=add';"/>
<input name="btnDel" type="button" value="删除" class="input1" onclick="javascript:ConfirmDel('$index_file&action=del&curpage=$curpage','此操作不可恢复,确认删除吗？');"/></dd>
</dl>
</div>
</form>
</div>
</body>
</html>
<!--
EOT;
}else if($action=="add" || $action=="edit"){
$action=="add" && $act_title = "新增";
$action=="edit" && $act_title = "编辑";
print <<<EOT
-->

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="js/png_IE6.js" type="text/javascript"></script>
<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/public.js" type="text/javascript"></script>
<title>编辑-右侧</title>
<link href="css/code.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function checkfrm(){
	if(isEmpty($('site_id').value)){
		$("att_site_id").show();
		$('site_id').focus();
		return false;
	}
	if(isEmpty($('name').value)){
		$("att_name").show();
		$('name').focus();
		return false;
	}	
	if(isEmpty($('demo_url').value)){
		$("att_demo_url").show();
		$('demo_url').focus();
		return false;
	}
	if(isEmpty($('week_price').value)){
		$("att_week_price").show();
	    $('att_week_price2').hide();		
		$('week_price').focus();
		return false;
	}else if(isInteger($('week_price').value)){
	    $('att_week_price2').show();
		$("att_week_price").hide();	    
	    $('week_price').focus();
		return false;
	}
	if(isEmpty($('click_price').value)){
		$("att_click_price").show();
		$("att_click_price2").hide();
		$('click_price').focus();
		return false;
	}else if(isInteger($('click_price').value)){
		$("att_click_price2").show();
		$("att_click_price").hide();		
	    $('click_price').focus();
		return false;
	}
	if(isEmpty($('adsize').value)){
		$("att_adsize").show();
		$('adsize').focus();
		return false;
	}	
	return true;
}
</script>
</head>

<body class="code">

<form name="form" action="$index_file" method="post" onsubmit="return checkfrm();">
<input type="hidden" name="action" value="save"/>
<input type="hidden" name="curid" value="$curid"/>

<div class="right_box">

<div class="right_tit">
<dl>
<dt></dt>
<dd>站点信息</dd>
</dl>
</div>
<div class="newID">
<dl>
<dt>$act_title 广告位信息</dt>
<dd class="dd00"></dd>

<dd class="dd01">所属站点<font color=red>*</font></dd>
<dd class="dd07"><span><select name="site_id" id="site_id" style="WIDTH: 100%" onchange="$('att_site_id').hide();"><option value="">请选择...</option>$op_sitelist</select></span></dd>
<dd class="dd08"><span id="att_site_id" style="display:none;color:red">请选择站点</span></dd>
<dd class="dd00"></dd>

<dd class="dd01">广告位名称<font color=red>*</font></dd>
<dd class="dd07"><span><input type="text"  id="name" name="name"  value="$db_advplace[name]" onkeydown="$('att_name').hide();"/></span></dd>
<dd class="dd08"><span id=att_name style="display:none;color:red">请输入广告位名称</span></dd>
<dd class="dd00"></dd>

<dd class="dd01">示例网址<font color=red>*</font></dd>
<dd class="dd07"><span><input type="text" id="demo_url" name="demo_url"  value="$demourl" onkeydown="$('att_demo_url').hide();"/></span></dd>
<dd class="dd08"><span id="att_demo_url" style="display:none;color:red">请选择站点类型</span></dd>
<dd class="dd00"></dd>

<dd class="dd01">每周计价(单位：元)<font color=red>*</font></dd>
<dd class="dd07"><span><input type="text" id="week_price" name="week_price" value="$weekprice"  onkeydown="$('att_week_price').hide();$('att_week_price2').hide();"/></span></dd>
<dd class="dd08"><span id="att_week_price" style="display:none;color:red">请输入每周计价</span></dd>
<dd class="dd08"><span id="att_week_price2" style="display:none;color:red">每周计价为数字</span></dd>
<dd class="dd00"></dd>

<dd class="dd01">点击计价(单位：元)<font color=red>*</font></dd>
<dd class="dd07"><span><input type="text" id="click_price" name="click_price" value="$clickprice"  onkeydown="$('att_click_price').hide();$('att_click_price2').hide()"/></span></dd>
<dd class="dd08"><span id="att_click_price" style="display:none;color:red">请输入点击计价</span></dd>
<dd class="dd08"><span id="att_click_price2" style="display:none;color:red">点击计价为数字</span></dd>
<dd class="dd00"></dd>

<dd class="dd01">广告位尺寸<font color=red>*</font></dd>
<dd class="dd07"><span><select id="adsize" name="adsize" style="WIDTH: 100%">
                <option value="">请选择...</option>
                $op_basesizelist
                	</select></span></dd>
<dd class="dd08"><span id="att_adsize" style="display:none;color:red">请选择广告位尺寸</span></dd>
<dd class="dd00"></dd>

<dd class="dd01">关 键 字</dd>
<dd class="dd07"><span><input type="text" id="keyword" name="keyword" value="$db_advplace[keyword]"/></span></dd>
<dd class="dd08"><span id="att_keyword" style="display:none;color:red">请输入关键字</span></dd>
<dd class="dd00"></dd>

<dd class="dd01">描述</dd>
<dd class="dd06"><textarea ID="memo" name="memo" cols="80" rows="10"></textarea></dd>
<dd class="dd08"></dd>
<dd class="dd00"></dd>

</dl>
</div>

<div class="editzhan">
<dl>
<dd><input name="submit" type="submit" value="提交" class="input1" /><input name="back" type="button" value="返回" class="input1" onclick="history.go(-1);"/></dd>
</dl>
</div>
</div>

 </form>
</body>
</html>
<!--
EOT;
}?>-->